<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>【{$Think.get.date}】的精选视频列表 <button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;"><i class="glyphicon glyphicon-share-alt"></i> 返 回</button>
        <a class="btn btn-default btn-return" href="{:U('index')}">全部日期</a>
        </h2>
    </div>
    <div class="cf">
        <div class="fl">
            <button class="btn ajax-post confirm btn-danger" url="{:U('del', array('id'=>$id))}" target-form="ids">删 除</button>
        </div>

    </div>
    <div class="tab-content">
    <notempty name="list">
    <form action="" method="post" class="form">
        <div class="data-table table-striped" style="">
        <table class="table table-bordered">
            <thead>
                <tr>
                <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                <th>视频</th>
                <th width="20%" class="">sort</th>
                <th class="">操作</th>
                </tr>
            </thead>
        <tbody>
            <volist name="list" id="vo">
                <tr>
                    <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
                    <td><a href="{:U('video/edit?id='.$vo['video_id'])}">{$vo.title}</a></td>
                    <td><input class="text form-control" name="sort[{$vo.id}]" value="{$vo.sort|default=0}" /></td>
                    <td>
                        <a class="btn btn-default btn-xs" title="编辑" href="{:U('edit?id='.$vo['id'])}"><i class="glyphicon glyphicon-pencil"></i></a>
                        <a href="{:U('del?id='.$vo['id'])}" class="confirm ajax-get btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
                    </td>
                </tr>
            </volist>
        </tbody>
        </table>
        </div>
        <br><br>
        <div class="form-item form-group form-action">
            <input type="hidden" name="date" value="{$Think.get.date}">
            <button class="btn submit-btn ajax-post btn-success btn-block" id="submit" onclick="do_submit();" type="submit" target-form="form">确 定 排 序</button>
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </form>
    <else />
        <div class="form-item">
            <div class="controls">
                <font color="red"><strong>请先在“视频”管理设置到此日的精选</strong></font>
            </div>
        </div>
        <br><br>
        <div class="form-item">
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </notempty>
    </div>
</block>

<block name="script">
    <script type="text/javascript">

        //导航高亮
        highlight_subnav('{:U('index')}');

    </script>
</block>
